import { IsNotEmpty, Length } from 'class-validator';

export class RegisterDto {
  @IsNotEmpty({ message: '手机号不能为空' })
  @Length(11, 11, { message: '手机号必须11位' })
  phone: string;

  @IsNotEmpty({ message: '密码不能为空' })
  @Length(6, 20, { message: '密码6-20位' })
  password: string;
}

export class LoginDto {
  @IsNotEmpty()
  phone: string;

  @IsNotEmpty()
  password: string;
}
